<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" >
    <taglib name="html" />
    <title>发布活动</title>
    <link rel="stylesheet" type="text/css" href="Public/Assets/css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="Public/Assets/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="Public/Assets/css/thems.css">
    <script type="text/javascript" src="Public/Assets/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/WdatePicker.js"> </script>
    <script type="text/javascript">
        $(function(){


            var main_h = $(window).height();
            $('.hy_list').css('height',main_h-45+'px');

            var main_w = $(window).width();
            $('.xjhy').css('width',main_w-40+'px');


            $(".tabBox .tabCont:first").css("display","block");
            $(".tabBox .tabNav li").click(function(){
                $(this).siblings("li").removeClass("now");
                $(this).addClass("now");
                $(this).parents(".tabBox").find(".tabCont").css("display","none");
                var i=$(this).index();
                $(this).parents(".tabBox").find(".tabCont:eq("+i+")").css("display","block");
            });

            $('.xial_m span').click(function(){
                $(this).parent('.xial_m').siblings('.xl_ctn').toggle();
            });

            /*js submit form action*/
            $("#add_course").click(function(){
                $("form").submit();
            });
        });
    </script>
    <style>
        .checkbox {
            width: 16px !important;
            height: 16px !important;
        }
    </style>
</head>

<body onLoad="Resize();">
<div id="right_ctn">
    <div class="right_m">
        <!--会议列表-->
        <div class="hy_list">
            <div class="box_t">
                <span class="name">修改课程</span>
            </div>
            <div class="space_hx">&nbsp;</div>
            <!--MCU配置-->
            <div class="xjhy" style="padding:0px;">
                <div class="tabBox_t">
                    <div class="tabBox">
                        <ul class="tabNav">
                            <li class="now"><span>修改课程</span></li>
                        </ul>
                        <div class="tabCont" style="display:block;">
                            <form method="post" action="{:U('doUpdateGoods')}" enctype="multipart/form-data">
                                <input type="hidden" name="id" value="{$_GET['id']}">
                                <ul class="hypz">
                                    <li class="clearfix">
                                        <span class="title">商品名称：</span>
                                        <input type="text" name="name" value="{$data.name}">
                                    </li>
                                    <li class="clearfix">
                                        <span class="title">列表介绍一：</span>
                                        <input type="text" name="intro"  value="{$data.intro}"/>
                                    </li>
                                    <li class="clearfix">
                                        <span class="title">商品介绍二：</span>
                                        <input type="text" name="intro2" value="{$data.intro2}"/>
                                    </li>
                                    <li class="clearfix">
                                        <span class="title">价格：</span>
                                        <input type="text" name="price" value="{$data.price}"/>
                                    </li>
                                    <li class="clearfix">
                                        <span class="title">列表展示图：</span>
                                        <input type="file" name="img">
                                    </li>
                                    <li class="clearfix">
                                        <span class="title">销量：</span>
                                        <input type="text" name="sales_volume" value="{$data.sales_volume}">
                                    </li>

                                    <li class="clearfix">
                                        <span class="title">排序：</span>
                                        <input type="text" name="sort" value="{$data.sort}">
                                    </li>

                                    <li class="clearfix">
                                        <span class="title">状态：</span>
                                        <input type="radio" name="state" <eq name="data.state" value="0">checked</eq> value="0">销售中
                                        <input type="radio" name="state" <eq name="data.state" value="1">checked</eq> value="1">下架
                                    </li>

                                    <li class="clearfix">
                                        <span class="title">文字内容</span><br><br><br>
                                        <div class="form-group" style="width: 900px;margin: 0 auto;margin-top: -30px;margin-left: 80px">
                                            <html:editor id="post-content" name="content_detail" type="UEDITOR">{$data.content}</html:editor>
                                        </div>
                                    </li>

                                    <li class="tj_btn">
                                        <a id="add_course">提交</a>
                                    </li>

                                </ul>
                            </form>
                        </div>

                    </div>
                </div>
            </div>
            <!--MCU配置-->
        </div>
        <!--会议列表-->
    </div>
</div>
</body>
</html>
<!-- 配置文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
<script>
    var ue = UE.getEditor('post-content',{
        initialFrameHeight:500,
        zIndex:100
    });
    function auto_start(){
        var type=$("#on_off").val();
        if(type==1){
            $("#auto_on").css('display','block');
            $("#per_on").css('display','none');
        }
        if(type==2){
            $("#auto_on").css('display','none');
            $("#per_on").css('display','block');
        }
        if(type==''){
            $("#auto_on").css('display','none');
            $("#per_on").css('display','none');
        }
    }
    function show_type(){
        var val = $("#cost_type").val();
        if(val==1){
            $("#laiyuan").css('display','block');
            $("#yuanjia").css('display','none');
            $("#free_end").css('display','none');
            $("#taojia").css('display','none');
            $("#node_free").css('display','none');
            $("#free_minutes").css('display','none');
        }else if(val==2){
            $("#yuanjia").css('display','block');
            $("#free_end").css('display','block');
            $("#taojia").css('display','block');
            $("#laiyuan").css('display','none');
            $("#node_free").css('display','block');
            $("#free_minutes").css('display','block');
        }
    }
    $(function () {
        var val = $("#cost_type").val();
        if(val==1){
            $("#laiyuan").css('display','block');
            $("#free_end").css('display','none');
            $("#yuanjia").css('display','none');
            $("#taojia").css('display','none');
            $("#node_free").css('display','none');
            $("#free_minutes").css('display','none');
        }else if(val==2){
            $("#yuanjia").css('display','block');
            $("#taojia").css('display','block');
            $("#free_end").css('display','block');
            $("#node_free").css('display','block');
            $("#laiyuan").css('display','none');
            $("#free_minutes").css('display','block');
        }
    })
</script>
